<!DOCTYPE html>
<html>
<head>
    <meta charset="utf-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <title>财务管理</title>
    <meta content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=0" name="viewport">     
    <meta content="yes" name="apple-mobile-web-app-capable">     
    <meta content="black" name="apple-mobile-web-app-status-bar-style">     
    <meta content="telephone=no" name="format-detection">
    <link rel="shortcut icon" href="/favicon.ico">
    <link rel="stylesheet" href="/H5/css/sm.min.css">
    <link rel="stylesheet" href="/H5/css/reset.css">
    <link rel="stylesheet" href="/H5/css/order.css">
</head>
<body>
		<div class="page-group ms-controller" :controller="finance">
	        <div class="page page-current">
	            <header class="bar bar-nav">
	              	<a class="icon icon-left pull-left" href="javascript:window.history.go(-1);"></a>
	              	<a class="icon icon-home pull-right" href="/H5"></a>
	              	<h1 class="title">财务管理</h1>
	            </header>
	            <div class="content visibility">
					<div class="list-block" style="margin:0; padding:0; background:white;">
		                <ul class="border">
		                    <li class="item-content item-link" :on-click="@jump('/H5/balance?type=1')">
		                    	<div class="item-inner">
		                        	<div class="item-title">账户余额</div>
		          					<div class="item-after" style="color:#F90;">￥{{@data.balance}}</div>
		                   		</div>
		                    </li>
		                    <li class="item-content item-link gray_bg" :on-click="@jump('/H5/remittance?type=1')">
		                    	<div class="item-inner">
		                        	<div class="item-title">汇款充值</div>
		                   		</div>
		                    </li>
		                    <li class="item-content item-link gray_bg" :on-click="@jump('/H5/record')">
		                    	<div class="item-inner">
		                        	<div class="item-title">购物积分</div>
		          					<div class="item-after" style="color:#0C3;">{{@data.total_point}}</div>
		                   		</div>
		                    </li>
		                    <li class="item-content item-link gray_bg" :on-click="@jump('/H5/draw?type=1')">
		                    	<div class="item-inner">
		                        	<div class="item-title">余额提现</div>
		                   		</div>
		                    </li>
		                    <li class="item-content item-link gray_bg" :on-click="@jump('/H5/transfer?type=1')">
		                    	<div class="item-inner">
		                        	<div class="item-title">财务流转</div>
		                   		</div>
		                    </li>
		                </ul>
		                <ul class="border">
		                    <li class="item-content" style="background: #efeff4">
		                    	<div class="item-inner">
		                        	<div class="item-title">会员收益</div>
		          					<div class="item-after" style="color:#F90;">￥{{@data.total_income}}</div>
		                   		</div>
		                    </li>
		                    <li class="item-content item-link gray_bg" :on-click="@jump('/H5/commission?type=1')">
		                    	<div class="item-inner">
		                        	<div class="item-title">零售佣金</div>
		          					<div class="item-after" style="color:#0C3;">￥{{@data.goods_income}}</div>
		                   		</div>
		                    </li>
		                    <li class="item-content item-link gray_bg" :on-click="@jump('/H5/commission?type=2')">
		                    	<div class="item-inner">
		                        	<div class="item-title">服务佣金</div>
		          					<div class="item-after" style="color:#0C3;">￥{{@data.service_income}}</div>
		                   		</div>
		                    </li>
		                    <li class="item-content item-link gray_bg" :on-click="@jump('/H5/bonus')">
		                    	<div class="item-inner">
		                        	<div class="item-title">管理分红</div>
		          					<div class="item-after" style="color:#0C3;">￥{{@data.manage_income}}</div>
		                   		</div>
		                    </li>
		                    <li class="item-content item-link gray_bg" :on-click="@jump('/H5/friendlist?type=2')">
		                    	<div class="item-inner">
		                        	<div class="item-title">服务中心</div>
		          					<div class="item-after" style="color:#0C3;">{{@data.service_center_income}}</div>
		                   		</div>
		                    </li>
		                </ul>
		                <ul class="border">
		                    <li class="item-content" style="background: #efeff4" :on-click="@jump('/H5/orderlist?status=0')">
		                        <div class="item-inner">
		                            <div class="item-title">订单管理</div>
		                            <div class="item-after" style="color:#F90;">总计{{@data.total_order}}单</div>
		                        </div>
		                    </li>
		                    <li class="item-content item-link gray_bg" :on-click="@jump('/H5/orderlist?status=0')">
		                    	<div class="item-inner">
		                        	<div class="item-title">待付款</div>
		          					<div class="item-after" style="color:#0C3;">{{@data.order_unpaid_num}}</div>
		                   		</div>
		                    </li>
		                    <li class="item-content item-link gray_bg" :on-click="@jump('/H5/orderlist?status=1')">
		                    	<div class="item-inner">
		                        	<div class="item-title">已付款</div>
		          					<div class="item-after" style="color:#0C3;">{{@data.order_paid_num}}</div>
		                   		</div>
		                    </li>
		                    <li class="item-content item-link gray_bg" :on-click="@jump('/H5/orderlist?status=2')">
		                    	<div class="item-inner">
		                        	<div class="item-title">发货中</div>
		          					<div class="item-after" style="color:#0C3;">{{@data.order_send_num}}</div>
		                   		</div>
		                    </li>
		                    <li class="item-content item-link gray_bg" :on-click="@jump('/H5/orderlist?status=3')">
		                    	<div class="item-inner">
		                        	<div class="item-title">已完成</div>
		          					<div class="item-after" style="color:#999;">{{@data.order_receive_num}}</div>
		                   		</div>
		                    </li>
			        	</ul>
					</div>
	            </div>
	        </div>
	    </div>
	<script type='text/javascript' src='/H5/js/zepto.min.js' charset='utf-8'></script>
	<script type='text/javascript' src='/H5/js/sm.min.js' charset='utf-8'></script>
	<script type='text/javascript' src='/H5/js/avalon.js' charset='utf-8'></script>
	<script type='text/javascript' src='/H5/js/simpleStorage.js' charset='utf-8'></script>
	<script type='text/javascript' src='/H5/js/mall.js' charset='utf-8'></script>
    <script>
    	var finance = avalon.define({
    		$id: "finance",
    		data: {},
    		jump: function( url ){
    			window.location.href = url;
    		},
    		getData: function(){
    			Mall.request( "/api/Finance" )
    				.always( function( data ){
    					if( data.error_code == 0 ){
    						finance.data = data.data;
    						$( ".content" ).removeClass( "visibility" );
    					}
    					else{
    						$.alert(data.error_msg)
    					}
    				} )
    		}
    	})
    	finance.getData();
    	avalon.scan( document.body );
    </script>
</body>
</html>